3.5.27 \(\int \frac {(d+e x^r)^3 (a+b \log (c x^n))^2}{x} \, dx\) [427]

Optimal. Leaf size=245 \[ \frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]

[Out]

6*b^2*d^2*e*n^2*x^r/r^3+3/4*b^2*d*e^2*n^2*x^(2*r)/r^3+2/27*b^2*e^3*n^2*x^(3*r)/r^3-6*b*d^2*e*n*x^r*(a+b*ln(c*x
^n))/r^2-3/2*b*d*e^2*n*x^(2*r)*(a+b*ln(c*x^n))/r^2-2/9*b*e^3*n*x^(3*r)*(a+b*ln(c*x^n))/r^2+3*d^2*e*x^r*(a+b*ln
(c*x^n))^2/r+3/2*d*e^2*x^(2*r)*(a+b*ln(c*x^n))^2/r+1/3*e^3*x^(3*r)*(a+b*ln(c*x^n))^2/r+1/3*d^3*(a+b*ln(c*x^n))
^3/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.21, antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2395, 2339, 30, 2342, 2341} \begin {gather*} \frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)^3*(a + b*Log[c*x^n])^2)/x,x]

[Out]

(6*b^2*d^2*e*n^2*x^r)/r^3 + (3*b^2*d*e^2*n^2*x^(2*r))/(4*r^3) + (2*b^2*e^3*n^2*x^(3*r))/(27*r^3) - (6*b*d^2*e*
n*x^r*(a + b*Log[c*x^n]))/r^2 - (3*b*d*e^2*n*x^(2*r)*(a + b*Log[c*x^n]))/(2*r^2) - (2*b*e^3*n*x^(3*r)*(a + b*L
og[c*x^n]))/(9*r^2) + (3*d^2*e*x^r*(a + b*Log[c*x^n])^2)/r + (3*d*e^2*x^(2*r)*(a + b*Log[c*x^n])^2)/(2*r) + (e
^3*x^(3*r)*(a + b*Log[c*x^n])^2)/(3*r) + (d^3*(a + b*Log[c*x^n])^3)/(3*b*n)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rubi steps

\begin {align*} \int \frac {\left (d+e x^r\right )^3 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=\int \left (\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^2}{x}+3 d^2 e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2+3 d e^2 x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2+e^3 x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=d^3 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+\left (3 d^2 e\right ) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx+\left (3 d e^2\right ) \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx+e^3 \int x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \text {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}-\frac {\left (6 b d^2 e n\right ) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}-\frac {\left (3 b d e^2 n\right ) \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}-\frac {\left (2 b e^3 n\right ) \int x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{3 r}\\ &=\frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.29, size = 262, normalized size = 1.07 \begin {gather*} \frac {1}{3} b^2 d^3 n^2 \log ^3(x)-b d^3 n \log ^2(x) \left (a+b \log \left (c x^n\right )\right )+d^3 \log (x) \left (a+b \log \left (c x^n\right )\right )^2+\frac {e x^r \left (18 a^2 r^2 \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right )-6 a b n r \left (108 d^2+27 d e x^r+4 e^2 x^{2 r}\right )+b^2 n^2 \left (648 d^2+81 d e x^r+8 e^2 x^{2 r}\right )-6 b r \left (-6 a r \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right )+b n \left (108 d^2+27 d e x^r+4 e^2 x^{2 r}\right )\right ) \log \left (c x^n\right )+18 b^2 r^2 \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right ) \log ^2\left (c x^n\right )\right )}{108 r^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)^3*(a + b*Log[c*x^n])^2)/x,x]

[Out]

(b^2*d^3*n^2*Log[x]^3)/3 - b*d^3*n*Log[x]^2*(a + b*Log[c*x^n]) + d^3*Log[x]*(a + b*Log[c*x^n])^2 + (e*x^r*(18*
a^2*r^2*(18*d^2 + 9*d*e*x^r + 2*e^2*x^(2*r)) - 6*a*b*n*r*(108*d^2 + 27*d*e*x^r + 4*e^2*x^(2*r)) + b^2*n^2*(648
*d^2 + 81*d*e*x^r + 8*e^2*x^(2*r)) - 6*b*r*(-6*a*r*(18*d^2 + 9*d*e*x^r + 2*e^2*x^(2*r)) + b*n*(108*d^2 + 27*d*
e*x^r + 4*e^2*x^(2*r)))*Log[c*x^n] + 18*b^2*r^2*(18*d^2 + 9*d*e*x^r + 2*e^2*x^(2*r))*Log[c*x^n]^2))/(108*r^3)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.33, size = 3984, normalized size = 16.26

method result size
risch \(\text {Expression too large to display}\) \(3984\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)^3*(a+b*ln(c*x^n))^2/x,x,method=_RETURNVERBOSE)

[Out]

-1/3*I/r*Pi*ln(c)*b^2*e^3*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*(x^r)^3-1/3*I/r*Pi*a*b*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*c*x^n)^2*x^r-1/4*csgn(I*c*x^n)^6*d^3*b^2*Pi^2*ln(x)+
1/6/r*Pi^2*b^2*e^3*csgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3*(x^r)^3-1/12/r*Pi^2*b^2*e^3*csgn(I*c)^2*csgn(I*x^n)
^2*csgn(I*c*x^n)^2*(x^r)^3-1/3/r*Pi^2*b^2*e^3*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)^4*(x^r)^3+1/6/r*Pi^2*b^2*e^3
*csgn(I*c)*csgn(I*x^n)^2*csgn(I*c*x^n)^3*(x^r)^3+I*ln(x)*Pi*ln(c)*b^2*d^3*csgn(I*c)*csgn(I*c*x^n)^2+I*ln(x)*Pi
*ln(c)*b^2*d^3*csgn(I*x^n)*csgn(I*c*x^n)^2+I*ln(x)*Pi*a*b*d^3*csgn(I*c)*csgn(I*c*x^n)^2+I*ln(x)*Pi*a*b*d^3*csg
n(I*x^n)*csgn(I*c*x^n)^2-3/8/r*Pi^2*b^2*d*e^2*csgn(I*c)^2*csgn(I*c*x^n)^4*(x^r)^2+3/4/r*Pi^2*b^2*d*e^2*csgn(I*
c)*csgn(I*c*x^n)^5*(x^r)^2+3/4/r*Pi^2*b^2*d*e^2*csgn(I*x^n)*csgn(I*c*x^n)^5*(x^r)^2-3/8/r*Pi^2*b^2*d*e^2*csgn(
I*x^n)^2*csgn(I*c*x^n)^4*(x^r)^2-3/4/r*Pi^2*b^2...

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 391, normalized size = 1.60 \begin {gather*} \frac {b^{2} e^{3} x^{3 \, r} \log \left (c x^{n}\right )^{2}}{3 \, r} + \frac {3 \, b^{2} d e^{2} x^{2 \, r} \log \left (c x^{n}\right )^{2}}{2 \, r} + \frac {3 \, b^{2} d^{2} e x^{r} \log \left (c x^{n}\right )^{2}}{r} + \frac {b^{2} d^{3} \log \left (c x^{n}\right )^{3}}{3 \, n} - \frac {2}{27} \, b^{2} e^{3} {\left (\frac {3 \, n x^{3 \, r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{3 \, r}}{r^{3}}\right )} - \frac {3}{4} \, b^{2} d e^{2} {\left (\frac {2 \, n x^{2 \, r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{2 \, r}}{r^{3}}\right )} - 6 \, b^{2} d^{2} e {\left (\frac {n x^{r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{r}}{r^{3}}\right )} + \frac {2 \, a b e^{3} x^{3 \, r} \log \left (c x^{n}\right )}{3 \, r} + \frac {3 \, a b d e^{2} x^{2 \, r} \log \left (c x^{n}\right )}{r} + \frac {6 \, a b d^{2} e x^{r} \log \left (c x^{n}\right )}{r} + \frac {a b d^{3} \log \left (c x^{n}\right )^{2}}{n} + a^{2} d^{3} \log \left (x\right ) - \frac {2 \, a b e^{3} n x^{3 \, r}}{9 \, r^{2}} + \frac {a^{2} e^{3} x^{3 \, r}}{3 \, r} - \frac {3 \, a b d e^{2} n x^{2 \, r}}{2 \, r^{2}} + \frac {3 \, a^{2} d e^{2} x^{2 \, r}}{2 \, r} - \frac {6 \, a b d^{2} e n x^{r}}{r^{2}} + \frac {3 \, a^{2} d^{2} e x^{r}}{r} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^3*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

1/3*b^2*e^3*x^(3*r)*log(c*x^n)^2/r + 3/2*b^2*d*e^2*x^(2*r)*log(c*x^n)^2/r + 3*b^2*d^2*e*x^r*log(c*x^n)^2/r + 1
/3*b^2*d^3*log(c*x^n)^3/n - 2/27*b^2*e^3*(3*n*x^(3*r)*log(c*x^n)/r^2 - n^2*x^(3*r)/r^3) - 3/4*b^2*d*e^2*(2*n*x
^(2*r)*log(c*x^n)/r^2 - n^2*x^(2*r)/r^3) - 6*b^2*d^2*e*(n*x^r*log(c*x^n)/r^2 - n^2*x^r/r^3) + 2/3*a*b*e^3*x^(3
*r)*log(c*x^n)/r + 3*a*b*d*e^2*x^(2*r)*log(c*x^n)/r + 6*a*b*d^2*e*x^r*log(c*x^n)/r + a*b*d^3*log(c*x^n)^2/n +
a^2*d^3*log(x) - 2/9*a*b*e^3*n*x^(3*r)/r^2 + 1/3*a^2*e^3*x^(3*r)/r - 3/2*a*b*d*e^2*n*x^(2*r)/r^2 + 3/2*a^2*d*e
^2*x^(2*r)/r - 6*a*b*d^2*e*n*x^r/r^2 + 3*a^2*d^2*e*x^r/r

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 500 vs. \(2 (228) = 456\).
time = 0.39, size = 500, normalized size = 2.04 \begin {gather*} \frac {36 \, b^{2} d^{3} n^{2} r^{3} \log \left (x\right )^{3} + 108 \, {\left (b^{2} d^{3} n r^{3} \log \left (c\right ) + a b d^{3} n r^{3}\right )} \log \left (x\right )^{2} + 4 \, {\left (9 \, b^{2} n^{2} r^{2} e^{3} \log \left (x\right )^{2} + 9 \, b^{2} r^{2} e^{3} \log \left (c\right )^{2} - 6 \, {\left (b^{2} n r - 3 \, a b r^{2}\right )} e^{3} \log \left (c\right ) + {\left (2 \, b^{2} n^{2} - 6 \, a b n r + 9 \, a^{2} r^{2}\right )} e^{3} + 6 \, {\left (3 \, b^{2} n r^{2} e^{3} \log \left (c\right ) - {\left (b^{2} n^{2} r - 3 \, a b n r^{2}\right )} e^{3}\right )} \log \left (x\right )\right )} x^{3 \, r} + 81 \, {\left (2 \, b^{2} d n^{2} r^{2} e^{2} \log \left (x\right )^{2} + 2 \, b^{2} d r^{2} e^{2} \log \left (c\right )^{2} - 2 \, {\left (b^{2} d n r - 2 \, a b d r^{2}\right )} e^{2} \log \left (c\right ) + {\left (b^{2} d n^{2} - 2 \, a b d n r + 2 \, a^{2} d r^{2}\right )} e^{2} + 2 \, {\left (2 \, b^{2} d n r^{2} e^{2} \log \left (c\right ) - {\left (b^{2} d n^{2} r - 2 \, a b d n r^{2}\right )} e^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 324 \, {\left (b^{2} d^{2} n^{2} r^{2} e \log \left (x\right )^{2} + b^{2} d^{2} r^{2} e \log \left (c\right )^{2} - 2 \, {\left (b^{2} d^{2} n r - a b d^{2} r^{2}\right )} e \log \left (c\right ) + {\left (2 \, b^{2} d^{2} n^{2} - 2 \, a b d^{2} n r + a^{2} d^{2} r^{2}\right )} e + 2 \, {\left (b^{2} d^{2} n r^{2} e \log \left (c\right ) - {\left (b^{2} d^{2} n^{2} r - a b d^{2} n r^{2}\right )} e\right )} \log \left (x\right )\right )} x^{r} + 108 \, {\left (b^{2} d^{3} r^{3} \log \left (c\right )^{2} + 2 \, a b d^{3} r^{3} \log \left (c\right ) + a^{2} d^{3} r^{3}\right )} \log \left (x\right )}{108 \, r^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^3*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/108*(36*b^2*d^3*n^2*r^3*log(x)^3 + 108*(b^2*d^3*n*r^3*log(c) + a*b*d^3*n*r^3)*log(x)^2 + 4*(9*b^2*n^2*r^2*e^
3*log(x)^2 + 9*b^2*r^2*e^3*log(c)^2 - 6*(b^2*n*r - 3*a*b*r^2)*e^3*log(c) + (2*b^2*n^2 - 6*a*b*n*r + 9*a^2*r^2)
*e^3 + 6*(3*b^2*n*r^2*e^3*log(c) - (b^2*n^2*r - 3*a*b*n*r^2)*e^3)*log(x))*x^(3*r) + 81*(2*b^2*d*n^2*r^2*e^2*lo
g(x)^2 + 2*b^2*d*r^2*e^2*log(c)^2 - 2*(b^2*d*n*r - 2*a*b*d*r^2)*e^2*log(c) + (b^2*d*n^2 - 2*a*b*d*n*r + 2*a^2*
d*r^2)*e^2 + 2*(2*b^2*d*n*r^2*e^2*log(c) - (b^2*d*n^2*r - 2*a*b*d*n*r^2)*e^2)*log(x))*x^(2*r) + 324*(b^2*d^2*n
^2*r^2*e*log(x)^2 + b^2*d^2*r^2*e*log(c)^2 - 2*(b^2*d^2*n*r - a*b*d^2*r^2)*e*log(c) + (2*b^2*d^2*n^2 - 2*a*b*d
^2*n*r + a^2*d^2*r^2)*e + 2*(b^2*d^2*n*r^2*e*log(c) - (b^2*d^2*n^2*r - a*b*d^2*n*r^2)*e)*log(x))*x^r + 108*(b^
2*d^3*r^3*log(c)^2 + 2*a*b*d^3*r^3*log(c) + a^2*d^3*r^3)*log(x))/r^3

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 588 vs. \(2 (246) = 492\).
time = 16.58, size = 588, normalized size = 2.40 \begin {gather*} \begin {cases} \left (a + b \log {\left (c \right )}\right )^{2} \left (d + e\right )^{3} \log {\left (x \right )} & \text {for}\: n = 0 \wedge r = 0 \\\left (d + e\right )^{3} \left (\begin {cases} \frac {a^{2} \log {\left (c x^{n} \right )} + a b \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} \log {\left (c x^{n} \right )}^{3}}{3}}{n} & \text {for}\: n \neq 0 \\\left (a^{2} + 2 a b \log {\left (c \right )} + b^{2} \log {\left (c \right )}^{2}\right ) \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) & \text {for}\: r = 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \left (d^{3} \log {\left (x \right )} + \frac {3 d^{2} e x^{r}}{r} + \frac {3 d e^{2} x^{2 r}}{2 r} + \frac {e^{3} x^{3 r}}{3 r}\right ) & \text {for}\: n = 0 \\\frac {a^{2} d^{3} \log {\left (c x^{n} \right )}}{n} + \frac {3 a^{2} d^{2} e x^{r}}{r} + \frac {3 a^{2} d e^{2} x^{2 r}}{2 r} + \frac {a^{2} e^{3} x^{3 r}}{3 r} + \frac {a b d^{3} \log {\left (c x^{n} \right )}^{2}}{n} - \frac {6 a b d^{2} e n x^{r}}{r^{2}} + \frac {6 a b d^{2} e x^{r} \log {\left (c x^{n} \right )}}{r} - \frac {3 a b d e^{2} n x^{2 r}}{2 r^{2}} + \frac {3 a b d e^{2} x^{2 r} \log {\left (c x^{n} \right )}}{r} - \frac {2 a b e^{3} n x^{3 r}}{9 r^{2}} + \frac {2 a b e^{3} x^{3 r} \log {\left (c x^{n} \right )}}{3 r} + \frac {b^{2} d^{3} \log {\left (c x^{n} \right )}^{3}}{3 n} + \frac {6 b^{2} d^{2} e n^{2} x^{r}}{r^{3}} - \frac {6 b^{2} d^{2} e n x^{r} \log {\left (c x^{n} \right )}}{r^{2}} + \frac {3 b^{2} d^{2} e x^{r} \log {\left (c x^{n} \right )}^{2}}{r} + \frac {3 b^{2} d e^{2} n^{2} x^{2 r}}{4 r^{3}} - \frac {3 b^{2} d e^{2} n x^{2 r} \log {\left (c x^{n} \right )}}{2 r^{2}} + \frac {3 b^{2} d e^{2} x^{2 r} \log {\left (c x^{n} \right )}^{2}}{2 r} + \frac {2 b^{2} e^{3} n^{2} x^{3 r}}{27 r^{3}} - \frac {2 b^{2} e^{3} n x^{3 r} \log {\left (c x^{n} \right )}}{9 r^{2}} + \frac {b^{2} e^{3} x^{3 r} \log {\left (c x^{n} \right )}^{2}}{3 r} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)**3*(a+b*ln(c*x**n))**2/x,x)

[Out]

Piecewise(((a + b*log(c))**2*(d + e)**3*log(x), Eq(n, 0) & Eq(r, 0)), ((d + e)**3*Piecewise(((a**2*log(c*x**n)
 + a*b*log(c*x**n)**2 + b**2*log(c*x**n)**3/3)/n, Ne(n, 0)), ((a**2 + 2*a*b*log(c) + b**2*log(c)**2)*log(x), T
rue)), Eq(r, 0)), ((a + b*log(c))**2*(d**3*log(x) + 3*d**2*e*x**r/r + 3*d*e**2*x**(2*r)/(2*r) + e**3*x**(3*r)/
(3*r)), Eq(n, 0)), (a**2*d**3*log(c*x**n)/n + 3*a**2*d**2*e*x**r/r + 3*a**2*d*e**2*x**(2*r)/(2*r) + a**2*e**3*
x**(3*r)/(3*r) + a*b*d**3*log(c*x**n)**2/n - 6*a*b*d**2*e*n*x**r/r**2 + 6*a*b*d**2*e*x**r*log(c*x**n)/r - 3*a*
b*d*e**2*n*x**(2*r)/(2*r**2) + 3*a*b*d*e**2*x**(2*r)*log(c*x**n)/r - 2*a*b*e**3*n*x**(3*r)/(9*r**2) + 2*a*b*e*
*3*x**(3*r)*log(c*x**n)/(3*r) + b**2*d**3*log(c*x**n)**3/(3*n) + 6*b**2*d**2*e*n**2*x**r/r**3 - 6*b**2*d**2*e*
n*x**r*log(c*x**n)/r**2 + 3*b**2*d**2*e*x**r*log(c*x**n)**2/r + 3*b**2*d*e**2*n**2*x**(2*r)/(4*r**3) - 3*b**2*
d*e**2*n*x**(2*r)*log(c*x**n)/(2*r**2) + 3*b**2*d*e**2*x**(2*r)*log(c*x**n)**2/(2*r) + 2*b**2*e**3*n**2*x**(3*
r)/(27*r**3) - 2*b**2*e**3*n*x**(3*r)*log(c*x**n)/(9*r**2) + b**2*e**3*x**(3*r)*log(c*x**n)**2/(3*r), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 634 vs. \(2 (228) = 456\).
time = 3.75, size = 634, normalized size = 2.59 \begin {gather*} \frac {1}{3} \, b^{2} d^{3} n^{2} \log \left (x\right )^{3} + \frac {3 \, b^{2} d^{2} n^{2} x^{r} e \log \left (x\right )^{2}}{r} + b^{2} d^{3} n \log \left (c\right ) \log \left (x\right )^{2} + \frac {6 \, b^{2} d^{2} n x^{r} e \log \left (c\right ) \log \left (x\right )}{r} + b^{2} d^{3} \log \left (c\right )^{2} \log \left (x\right ) + a b d^{3} n \log \left (x\right )^{2} + \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2} \log \left (x\right )^{2}}{2 \, r} + \frac {3 \, b^{2} d^{2} x^{r} e \log \left (c\right )^{2}}{r} - \frac {6 \, b^{2} d^{2} n^{2} x^{r} e \log \left (x\right )}{r^{2}} + \frac {6 \, a b d^{2} n x^{r} e \log \left (x\right )}{r} + 2 \, a b d^{3} \log \left (c\right ) \log \left (x\right ) + \frac {3 \, b^{2} d n x^{2 \, r} e^{2} \log \left (c\right ) \log \left (x\right )}{r} + \frac {b^{2} n^{2} x^{3 \, r} e^{3} \log \left (x\right )^{2}}{3 \, r} - \frac {6 \, b^{2} d^{2} n x^{r} e \log \left (c\right )}{r^{2}} + \frac {6 \, a b d^{2} x^{r} e \log \left (c\right )}{r} + \frac {3 \, b^{2} d x^{2 \, r} e^{2} \log \left (c\right )^{2}}{2 \, r} + a^{2} d^{3} \log \left (x\right ) - \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2} \log \left (x\right )}{2 \, r^{2}} + \frac {3 \, a b d n x^{2 \, r} e^{2} \log \left (x\right )}{r} + \frac {2 \, b^{2} n x^{3 \, r} e^{3} \log \left (c\right ) \log \left (x\right )}{3 \, r} + \frac {6 \, b^{2} d^{2} n^{2} x^{r} e}{r^{3}} - \frac {6 \, a b d^{2} n x^{r} e}{r^{2}} + \frac {3 \, a^{2} d^{2} x^{r} e}{r} - \frac {3 \, b^{2} d n x^{2 \, r} e^{2} \log \left (c\right )}{2 \, r^{2}} + \frac {3 \, a b d x^{2 \, r} e^{2} \log \left (c\right )}{r} + \frac {b^{2} x^{3 \, r} e^{3} \log \left (c\right )^{2}}{3 \, r} - \frac {2 \, b^{2} n^{2} x^{3 \, r} e^{3} \log \left (x\right )}{9 \, r^{2}} + \frac {2 \, a b n x^{3 \, r} e^{3} \log \left (x\right )}{3 \, r} + \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2}}{4 \, r^{3}} - \frac {3 \, a b d n x^{2 \, r} e^{2}}{2 \, r^{2}} + \frac {3 \, a^{2} d x^{2 \, r} e^{2}}{2 \, r} - \frac {2 \, b^{2} n x^{3 \, r} e^{3} \log \left (c\right )}{9 \, r^{2}} + \frac {2 \, a b x^{3 \, r} e^{3} \log \left (c\right )}{3 \, r} + \frac {2 \, b^{2} n^{2} x^{3 \, r} e^{3}}{27 \, r^{3}} - \frac {2 \, a b n x^{3 \, r} e^{3}}{9 \, r^{2}} + \frac {a^{2} x^{3 \, r} e^{3}}{3 \, r} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^3*(a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

1/3*b^2*d^3*n^2*log(x)^3 + 3*b^2*d^2*n^2*x^r*e*log(x)^2/r + b^2*d^3*n*log(c)*log(x)^2 + 6*b^2*d^2*n*x^r*e*log(
c)*log(x)/r + b^2*d^3*log(c)^2*log(x) + a*b*d^3*n*log(x)^2 + 3/2*b^2*d*n^2*x^(2*r)*e^2*log(x)^2/r + 3*b^2*d^2*
x^r*e*log(c)^2/r - 6*b^2*d^2*n^2*x^r*e*log(x)/r^2 + 6*a*b*d^2*n*x^r*e*log(x)/r + 2*a*b*d^3*log(c)*log(x) + 3*b
^2*d*n*x^(2*r)*e^2*log(c)*log(x)/r + 1/3*b^2*n^2*x^(3*r)*e^3*log(x)^2/r - 6*b^2*d^2*n*x^r*e*log(c)/r^2 + 6*a*b
*d^2*x^r*e*log(c)/r + 3/2*b^2*d*x^(2*r)*e^2*log(c)^2/r + a^2*d^3*log(x) - 3/2*b^2*d*n^2*x^(2*r)*e^2*log(x)/r^2
 + 3*a*b*d*n*x^(2*r)*e^2*log(x)/r + 2/3*b^2*n*x^(3*r)*e^3*log(c)*log(x)/r + 6*b^2*d^2*n^2*x^r*e/r^3 - 6*a*b*d^
2*n*x^r*e/r^2 + 3*a^2*d^2*x^r*e/r - 3/2*b^2*d*n*x^(2*r)*e^2*log(c)/r^2 + 3*a*b*d*x^(2*r)*e^2*log(c)/r + 1/3*b^
2*x^(3*r)*e^3*log(c)^2/r - 2/9*b^2*n^2*x^(3*r)*e^3*log(x)/r^2 + 2/3*a*b*n*x^(3*r)*e^3*log(x)/r + 3/4*b^2*d*n^2
*x^(2*r)*e^2/r^3 - 3/2*a*b*d*n*x^(2*r)*e^2/r^2 + 3/2*a^2*d*x^(2*r)*e^2/r - 2/9*b^2*n*x^(3*r)*e^3*log(c)/r^2 +
2/3*a*b*x^(3*r)*e^3*log(c)/r + 2/27*b^2*n^2*x^(3*r)*e^3/r^3 - 2/9*a*b*n*x^(3*r)*e^3/r^2 + 1/3*a^2*x^(3*r)*e^3/
r

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (d+e\,x^r\right )}^3\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*x^r)^3*(a + b*log(c*x^n))^2)/x,x)

[Out]

int(((d + e*x^r)^3*(a + b*log(c*x^n))^2)/x, x)

________________________________________________________________________________________